package cn.sju.tq;

import cn.sju.tq.beans.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringBeanMain {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
        Student student1 = (Student) context.getBean("student1");
        Student student2 = (Student) context.getBean("student1");
        System.out.println(student1==student2);
        System.out.println("------------------------------------------");
    }
}
